﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Master/Admin/Admin.Master" AutoEventWireup="true"
    CodeBehind="TrangManagement.aspx.cs" Inherits="HCFramework.Page.AdminTool.TrangManagement.TrangManagement" %>

<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<%@ Register Src="~/User/Role/ChooseRole.ascx" TagName="ChooseRole" TagPrefix="uc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <div class="groupHeader">
        Page management
    </div>
    <asp:Panel ID="PanelGrid" runat="server">
        <telerik:RadGrid ID="RadGridMain" runat="server" Skin="Office2007" AutoGenerateColumns="False"
            OnItemCommand="RadGridMain_ItemCommand" OnPreRender="RadGridMain_PreRender" AllowFilteringByColumn="True"
            AllowPaging="True" AllowSorting="True" GridLines="None" AllowMultiRowSelection="True">
            <ClientSettings>
                <Selecting AllowRowSelect="True" />
            </ClientSettings>
            <MasterTableView CommandItemDisplay="Top" CommandItemSettings-AddNewRecordText="Thêm mới"
                NoMasterRecordsText="No record.">
                <RowIndicatorColumn>
                    <HeaderStyle Width="20px" />
                </RowIndicatorColumn>
                <ExpandCollapseColumn>
                    <HeaderStyle Width="20px" />
                </ExpandCollapseColumn>
                <CommandItemSettings AddNewRecordText="Thêm mới" />
                <Columns>
                    <telerik:GridClientSelectColumn UniqueName="column">
                    </telerik:GridClientSelectColumn>
                    <telerik:GridBoundColumn DataField="TrangID" UniqueName="TrangID" Visible="false">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="URL" HeaderText="URL" UniqueName="URL">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="RoleName" HeaderText="Role" UniqueName="RoleName">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="Title" HeaderText="Title" UniqueName="Title">
                    </telerik:GridBoundColumn>
                    <telerik:GridButtonColumn CommandName="Sua" Text="Edit" UniqueName="Sua">
                    </telerik:GridButtonColumn>
                    <telerik:GridButtonColumn CommandName="Xoa" Text="Delete" UniqueName="Xoa" ConfirmText="Bạn có chắc chắn xóa?">
                    </telerik:GridButtonColumn>
                </Columns>
                <CommandItemTemplate>
                    <asp:Image ID="Image1" runat="server" ImageUrl="~/Image/add.gif" />
                    <asp:LinkButton ID="LinkButton1" runat="server" CommandName="Them" AccessKey="n"
                        TabIndex="1">Insert</asp:LinkButton>
                </CommandItemTemplate>
            </MasterTableView>
        </telerik:RadGrid>
        <div style="padding-top: 10px">
            <uc1:ChooseRole ID="ChooseRole1" runat="server" />
            <asp:LinkButton ID="LinkButtonAddRole" OnClientClick="return confirm('Are you sure?');"
                runat="server" CssClass="linkButton" OnClick="LinkButtonAddRole_Click">Add role</asp:LinkButton>
            <asp:LinkButton ID="LinkButtonDeleteRole" OnClientClick="return confirm('Are you sure?');"
                runat="server" CssClass="linkButton" OnClick="LinkButtonDeleteRole_Click">Remove role</asp:LinkButton>
            <asp:LinkButton ID="LinkButtonAutoFind" CssClass="linkButton" OnClientClick="return confirm('Are you sure?');"
                runat="server" OnClick="LinkButtonAutoFind_Click">Auto insert pages</asp:LinkButton>
        </div>
    </asp:Panel>
    <asp:Panel ID="PanelAddAndEdit" runat="server">
        <table>
            <tr>
                <td style="font-weight: bold">
                    URL:
                </td>
                <td>
                    <asp:TextBox ID="TextBoxURL" runat="server" Width="500px"></asp:TextBox>
                </td>
                <td>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="TextBoxURL"
                        ErrorMessage="Input URL."></asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr>
                <td style="font-weight: bold">
                    Title:
                </td>
                <td>
                    <asp:TextBox ID="TextBoxTitle" runat="server" Width="500px"></asp:TextBox>
                </td>
                <td>
                </td>
            </tr>
            <tr>
                <td style="font-weight: bold">
                    Meta keyword:
                </td>
                <td>
                    <asp:TextBox ID="TextBoxMeta" runat="server" Width="500px"></asp:TextBox>
                </td>
                <td>
                </td>
            </tr>
            <tr>
                <td style="font-weight: bold">
                    Meta description:
                </td>
                <td>
                    <asp:TextBox ID="TextBoxDescription" runat="server" Width="500px"></asp:TextBox>
                </td>
                <td>
                </td>
            </tr>
            <tr>
                <td>
                </td>
                <td>
                    <asp:Button ID="ButtonAdd" runat="server" Text="Insert" OnClick="ButtonAdd_Click" />
                    <asp:Button ID="ButtonUpdate" runat="server" Text="Update" OnClick="ButtonUpdate_Click" />
                    <asp:Button ID="ButtonCancel" runat="server" Text="Cancel" OnClick="ButtonCancel_Click"
                        CausesValidation="False" />
                </td>
                <td>
                </td>
            </tr>
        </table>
    </asp:Panel>
    <asp:Label ID="LabelID" runat="server" Text="" Visible="False"></asp:Label>
</asp:Content>
